<div class="padding-bottom-45">
  <div class="modal-header">
    <div class="modal-title">{{ title }}</div>
  </div>
  <form nz-form [formGroup]="form" #validateForm="ngForm" (ngSubmit)="save()" *ngIf="organizationUnits">

    <nz-form-item nz-row>
      <nz-form-label nz-col [nzSm]="5" nzRequired [nzXs]="24">显示名称</nz-form-label>
      <nz-form-control [nzSm]="19" [nzErrorTip]="errorDisplayNameTpl" nzHasFeedback>
        <input nz-input formControlName="displayName" placeholder="请输入显示名称"
          [(ngModel)]="organizationUnits.displayName" />
        <ng-template #errorDisplayNameTpl let-control>
          <ng-container *ngIf="control.hasError('required')">
            不能为空!
          </ng-container>
          <ng-container *ngIf="control.hasError('maxLength')">
            显示名称必须大于0小于30个字符!
          </ng-container>
        </ng-template>
      </nz-form-control>
    </nz-form-item>
    <div class="modal-footer">
      <button nz-button type="button" [disabled]="saving" (click)="close()">
        取消
      </button>
      <button nz-button [nzType]="'primary'" type="submit" [disabled]="!validateForm.valid || saving">
        保存
      </button>
    </div>
  </form>
</div>